function fig2_10

clf
% get(gcf)
set(gcf,'Position', [25 1115 658 230])
co = [0 0 1;
    0 0.5 0;
    1 0 0;
    0 0.75 0.75;
    0.75 0 0.75;
    0.75 0.75 0;
    0.25 0.25 0.25];
set(groot,'defaultAxesColorOrder',co)
subaxis(1,1,1,1,'MT',0.01,'MB',0.2,'MR',0.01,'ML',0.05,'P',0.04)

nx=20;
xmax=5;
x=linspace(1,xmax,nx);

for i=1:nx
    y(i)=int2(@(t)sqrt(t/(1+t))*exp(-x(i)*(t^3-6*t^2+9*t+1)),0,4);
end

for i=1:nx
    Y1(i)=0.5*sqrt(pi/x(i))*exp(-x(i));
end

plot(x,y,'--b','LineWidth',1.3,'MarkerSize',10)
hold on
plot(x,Y1,'--r','LineWidth',1,'MarkerSize',10)
%axis([0 xmax -0.5 0.6])

ax = gca;
ax.XAxis.TickLabelInterpreter = 'latex';
ax.YAxis.TickLabelInterpreter = 'latex';
set(gca,'FontSize',13)

box on
grid on
legend('\, Numerical','\, First Term\,\,\,','Location','NorthEast','FontSize',13,'Interpreter','latex','AutoUpdate','off')

% say=['$ t = 0.2$']; 
% text(0.1,0.02,say,'FontSize',13,'Interpreter', 'latex')

xlabel('$x$\,-\,axis','Interpreter','latex','FontSize',14)
%ylabel('$y(t)$','Interpreter','latex','FontSize',14)

%exportgraphics(gcf,'/Users/mark/Desktop/L.pdf')

















